home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / acct.z / acct
Encoding:
Text File  |  2001-04-17  |  15.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaacccccccctttt((((1111MMMM))))                                                              aaaacccccccctttt((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _aaaa_cccc_cccc_tttt:  _aaaa_cccc_cccc_tttt_dddd_iiii_ssss_kkkk, _aaaa_cccc_cccc_tttt_dddd_uuuu_ssss_gggg, _aaaa_cccc_cccc_tttt_oooo_nnnn, _aaaa_cccc_cccc_tttt_wwww_tttt_mmmm_pppp _cccc_llll_oooo_ssss_eeee_wwww_tttt_mmmm_pppp, _uuuu_tttt_mmmm_pppp_2222_wwww_tttt_mmmm_pppp -
  10.      overview of accounting and miscellaneous accounting commands
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_aaaa_cccc_cccc_tttt_dddd_iiii_ssss_kkkk _[[[[_----_cccc_]]]]
  14.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_aaaa_cccc_cccc_tttt_dddd_uuuu_ssss_gggg [_----_uuuu _f_i_l_e] [_----_pppp _f_i_l_e]
  15.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_aaaa_cccc_cccc_tttt_oooo_nnnn [_f_i_l_e]
  16.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_aaaa_cccc_cccc_tttt_wwww_tttt_mmmm_pppp "_r_e_a_s_o_n"
  17.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_llll_oooo_ssss_eeee_wwww_tttt_mmmm_pppp
  18.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_uuuu_tttt_mmmm_pppp_2222_wwww_tttt_mmmm_pppp
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      Accounting software is structured as a set of tools (consisting of both C
  22.      programs and shell procedures) that can be used to build accounting
  23.      systems.  _aaaa_cccc_cccc_tttt_ssss_hhhh(1M) describes the set of shell procedures built on top
  24.      of the C programs.
  25.  
  26.      Connect-time accounting is handled by various programs that write records
  27.      into _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp, as described in _uuuu_tttt_mmmm_pppp(4).  The programs described in
  28.      _aaaa_cccc_cccc_tttt_cccc_oooo_nnnn(1M) convert this file into session and charging records, which
  29.      are then summarized by _aaaa_cccc_cccc_tttt_mmmm_eeee_rrrr_gggg(1M).
  30.  
  31.      Process accounting is performed by the UNIX system kernel.  Upon
  32.      termination of a process, one record per process is written to a file
  33.      (normally _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_pppp_aaaa_cccc_cccc_tttt).  The programs in _aaaa_cccc_cccc_tttt_pppp_rrrr_cccc(1M) summarize this
  34.      data for charging purposes; _aaaa_cccc_cccc_tttt_cccc_mmmm_ssss(1M) is used to summarize command
  35.      usage.  Current process data can be examined using _aaaa_cccc_cccc_tttt_cccc_oooo_mmmm(1).
  36.  
  37.      Process accounting and connect-time accounting (or any accounting records
  38.      in the _tttt_aaaa_cccc_cccc_tttt format described in _aaaa_cccc_cccc_tttt(4)) can be merged and summarized
  39.      into total accounting records by _aaaa_cccc_cccc_tttt_mmmm_eeee_rrrr_gggg (see _tttt_aaaa_cccc_cccc_tttt format in _aaaa_cccc_cccc_tttt(4)).
  40.      _pppp_rrrr_tttt_aaaa_cccc_cccc_tttt (see _aaaa_cccc_cccc_tttt_ssss_hhhh(1M)) is used to format any or all accounting records.
  41.  
  42.      _aaaa_cccc_cccc_tttt_dddd_iiii_ssss_kkkk reads lines that contain user ID, login name, and number of disk
  43.      blocks and converts them to total accounting records that can be merged
  44.      with other accounting records.
  45.  
  46.      By default, the _aaaa_cccc_cccc_tttt_dddd_iiii_ssss_kkkk command reads standard input and converts
  47.      records to _tttt_aaaa_cccc_cccc_tttt format, which it writes to standard output.  (See
  48.      _aaaa_cccc_cccc_tttt(4) for the format.)
  49.  
  50.      The _----_cccc option reads standard input and converts records to _cccc_aaaa_cccc_cccc_tttt format,
  51.      which it writes to standard output.  These records can be merged with
  52.      other _cccc_aaaa_cccc_cccc_tttt records by using the _cccc_ssss_aaaa_aaaa_dddd_dddd_cccc(1M) command.
  53.  
  54.      _aaaa_cccc_cccc_tttt_dddd_uuuu_ssss_gggg reads its standard input (usually from _ffff_iiii_nnnn_dddd _//// _----_pppp_rrrr_iiii_nnnn_tttt) and
  55.      computes disk resource consumption (including indirect blocks) by login.
  56.      If _----_uuuu is given, records consisting of those filenames for which _aaaa_cccc_cccc_tttt_dddd_uuuu_ssss_gggg
  57.      charges no one are placed in _f_i_l_e (a potential source for finding users
  58.      trying to avoid disk charges).  If _----_pppp is given, _f_i_l_e is the name of the
  59.      password file.  This option is not needed if the password file is
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaacccccccctttt((((1111MMMM))))                                                              aaaacccccccctttt((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      _////_eeee_tttt_cccc_////_pppp_aaaa_ssss_ssss_wwww_dddd.  (See _dddd_iiii_ssss_kkkk_uuuu_ssss_gggg(1M) for more details.)
  75.  
  76.      _aaaa_cccc_cccc_tttt_oooo_nnnn _[[[[_ffff_iiii_llll_eeee_]]]] changes the state and location of kernal accounting output.
  77.      If _f_i_l_e is given, _aaaa_cccc_cccc_tttt_oooo_nnnn directs the kernal to append the process
  78.      accounting records to _f_i_l_e, (_aaaa_cccc_cccc_tttt_oooo_nnnn will create the file if it doesn't
  79.      already exist). _aaaa_cccc_cccc_tttt_oooo_nnnn without _f_i_l_e turns accounting off. Although _aaaa_cccc_cccc_tttt_oooo_nnnn
  80.      may be run as root it is normally ran as _a_d_m. To change the state of
  81.      accounting _a_d_m requires the capability of CAP_ACCT_MGT and on Trusted
  82.      Irix systems CAP_MAC_WRITE. (see _cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_iiii_eeee_ssss(4) ).
  83.  
  84.      _aaaa_cccc_cccc_tttt_oooo_nnnn is typically ran by scripts and would not normally be run directly
  85.      by a user. If accounting is to be turned on and off manually, the script
  86.      _////_eeee_tttt_cccc_////_iiii_nnnn_iiii_tttt_...._dddd_////_aaaa_cccc_cccc_tttt _s_t_a_r_t|_s_t_o_p should be used. _////_eeee_tttt_cccc_////_iiii_nnnn_iiii_tttt_...._dddd_////_aaaa_cccc_cccc_tttt uses _ssss_uuuu(1M)
  87.      to acquire the necessary capabilities before calling
  88.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_ssss_tttt_aaaa_rrrr_tttt_uuuu_pppp and _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_ssss_hhhh_uuuu_tttt_dddd_oooo_wwww_nnnn which call _aaaa_cccc_cccc_tttt_oooo_nnnn.
  89.  
  90.      _aaaa_cccc_cccc_tttt_wwww_tttt_mmmm_pppp writes a _uuuu_tttt_mmmm_pppp(4) record to its standard output.  The record
  91.      contains the current time and a string of characters that describe the
  92.      _r_e_a_s_o_n.  A record type of ACCOUNTING is assigned (see _uuuu_tttt_mmmm_pppp(4)).  _r_e_a_s_o_n
  93.      must be a string of 11 or fewer characters, numbers, _$$$$, or spaces.  The
  94.      accounting startup and shutdown scripts _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_ssss_tttt_aaaa_rrrr_tttt_uuuu_pppp and
  95.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_ssss_hhhh_uuuu_tttt_aaaa_cccc_cccc_tttt use the _aaaa_cccc_cccc_tttt_wwww_tttt_mmmm_pppp command to record system startup
  96.      and shutdown events.
  97.  
  98.      For each user currently logged on, _cccc_llll_oooo_ssss_eeee_wwww_tttt_mmmm_pppp puts a false _DDDD_EEEE_AAAA_DDDD______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS
  99.      record in the _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp file.  _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt (see _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt(1M)) uses this
  100.      false _DDDD_EEEE_AAAA_DDDD______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS record so that the connect-time accounting procedures
  101.      can track the time used by users logged on before _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt was invoked.
  102.  
  103.      For each user currently logged on, _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt uses _uuuu_tttt_mmmm_pppp_2222_wwww_tttt_mmmm_pppp to create an
  104.      entry in the file _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp, created by _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt.  Entries in
  105.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp enable subsequent invocations of _rrrr_uuuu_nnnn_aaaa_cccc_cccc_tttt to account for
  106.      connect times of users currently logged in.
  107.  
  108. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  109.      The file _////_eeee_tttt_cccc_////_cccc_oooo_nnnn_ffff_iiii_gggg_////_aaaa_cccc_cccc_tttt controls the automatic startup and periodic
  110.      report generation of the accounting subsystem.  If this file contains the
  111.      flag value _oooo_nnnn, process accounting is enabled by _////_eeee_tttt_cccc_////_iiii_nnnn_iiii_tttt_...._dddd_////_aaaa_cccc_cccc_tttt each
  112.      time the system is brought up, and nightly reports are generated and
  113.      placed in the directory _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_ssss_uuuu_mmmm.  _cccc_hhhh_kkkk_cccc_oooo_nnnn_ffff_iiii_gggg(1M) should be used
  114.      to modify the contents of the _////_eeee_tttt_cccc_////_cccc_oooo_nnnn_ffff_iiii_gggg_////_aaaa_cccc_cccc_tttt file.
  115.  
  116.      The accounting software consists of accounting report generation software
  117.      with built-in tables of fixed size that might need to be increased on
  118.      larger systems.  All of these programs now check the environment when
  119.      they are invoked for the requested table sizes.  The accepted environment
  120.      variables are
  121.  
  122.      _A_C_C_T__M_A_X_U_S_E_R_S   Indicates the number of different users that can be
  123.                      reported by _dddd_iiii_ssss_kkkk_uuuu_ssss_gggg(1M) or _aaaa_cccc_cccc_tttt_dddd_uuuu_ssss_gggg(1M).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaacccccccctttt((((1111MMMM))))                                                              aaaacccccccctttt((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      _A_C_C_T__M_A_X_I_G_N     Indicates the number of different filesystem names to be
  141.                      ignored by _dddd_iiii_ssss_kkkk_uuuu_ssss_gggg(1M) in its report.
  142.  
  143.      _A_C_C_T__A__S_S_I_Z_E    Indicates the maximum number of sessions that can be
  144.                      reported by _aaaa_cccc_cccc_tttt_pppp_rrrr_cccc_1111(1M) in one accounting run.
  145.  
  146.      _A_C_C_T__A__T_S_I_Z_E    Indicates the maximum number of login lines that can be
  147.                      reported by _aaaa_cccc_cccc_tttt_cccc_oooo_nnnn(1M) and _aaaa_cccc_cccc_tttt_cccc_oooo_nnnn_1111(1M).
  148.  
  149.      _A_C_C_T__A__U_S_I_Z_E    Indicates the number of distinct login names in one
  150.                      accounting run of _aaaa_cccc_cccc_tttt_pppp_rrrr_cccc(1M), _aaaa_cccc_cccc_tttt_pppp_rrrr_cccc_1111(1M),
  151.                      _aaaa_cccc_cccc_tttt_pppp_rrrr_cccc_2222(1M), and _aaaa_cccc_cccc_tttt_cccc_oooo_nnnn(1M).
  152.  
  153.      _A_C_C_T__C_S_I_Z_E      Indicates the maximum number of distinct commands in one
  154.                      accounting run of _aaaa_cccc_cccc_tttt_cccc_mmmm_ssss(1M).
  155.  
  156.      These environment variables can be specified in the accounting-related
  157.      entries of the appropriate _c_r_o_n_t_a_b files.
  158.  
  159. FFFFIIIILLLLEEEESSSS
  160.      _////_eeee_tttt_cccc_////_pppp_aaaa_ssss_ssss_wwww_dddd        used for login name to user ID conversions
  161.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt      holds all accounting commands listed in section 1M
  162.                         of this manual
  163.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_pppp_aaaa_cccc_cccc_tttt     current process accounting file
  164.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp      login/logoff history file
  165.      _////_eeee_tttt_cccc_////_cccc_oooo_nnnn_ffff_iiii_gggg_////_aaaa_cccc_cccc_tttt   if it contains _oooo_nnnn, accounting runs automatically
  166.  
  167. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  168.      acctcms(1M), acctcom(1), acctcon(1M), acctmerg(1M), acctprc(1M),
  169.      acctsh(1M), chkconfig(1M), csaaddc(1M), dodisk(1M), fwtmp(1M),
  170.      runacct(1M), acct(2), acct(4), utmp(4).
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.